<?php

namespace common\models\patient;

use Yii;

/**
 * This is the model class for table "{{%patient_allocation_record}}".
 *
 * @property int $id
 * @property int $project_id
 * @property string $patient_card_id 患者诊疗号
 * @property int $member_id 分配给的系统用户ID
 * @property int $current_profession_id 当前分配给的系统用户岗位：1：医助 2：客服
 * @property int $operate_id 操作人ID
 * @property int $created_at 添加时间
 * @property int $updated_at 更新时间
 */
class AllocationRecord extends \common\models\BaseModel
{
    const CURRENT_PROFESSION_ID_MEDICAL = 1;// 医助
    const CURRENT_PROFESSION_ID_CUSTOMER = 2;// 客服

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%patient_allocation_record}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['project_id', 'member_id', 'current_profession_id', 'operate_id', 'created_at', 'updated_at'], 'integer'],
            [['patient_card_id'], 'string', 'max' => 100],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'project_id' => 'Project ID',
            'patient_card_id' => '患者诊疗号',
            'member_id' => '分配给的系统用户ID',
            'current_profession_id' => '当前分配给的系统用户岗位：1：医助 2：客服',
            'operate_id' => '操作人ID',
            'created_at' => '添加时间',
            'updated_at' => '更新时间',
        ];
    }
}
